#! /usr/bin/env bash

set -e

PROJECT_DIR=`pwd`


print_help() {
    echo "usage sh build.sh <platform>(ios|android) [configuration](Release|Debug)"
    exit 0
}

PLATFORM=$1
CONFIG=$2

if [ -z "$CONFIG" ]; then
    CONFIG="Release"
fi

if [ $CONFIG != "Release" ] && [ $CONFIG != "Debug" ]; then
    print_help
fi

if [ "$PLATFORM" == "android" ]; then
    build_android
elif [ "$PLATFORM" == "ios" ]; then
    build_ios
else
    print_help
fi

echo "build mydecoder successfully"